import JSEncrypt from "jsencrypt";
const publicKey =
	"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCDzNqPhq2nk1aIsIK30X7UAHC5jNqVKk12ZxsVEOjPFajV82VuJ7a31uLtU3NWRN4SIzhXmhAiptiDXq04AReV6veh3xdI069xmsIx/EEJNHnL034is6gSVev8p7wJ+qevxdYUGaMVgAV6osYAeQhMTTld emiiriKVAoeezhs5fQIDAQAB";
export function encrypt(data: any) {
	//new一个对象
	let encrypt: any = new JSEncrypt();
	//设置公钥
	encrypt.setPublicKey(publicKey);
	let result = encrypt.encrypt(data);
	return result;
}
